﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Abp.GridFS.Entity
{
    public class GridFsInfo
    {
        public Guid Id { get; set; }

        /// <summary>
        /// 文件hash值  Length+hash   加长度是为了索引效率高些。
        /// </summary>
        [System.ComponentModel.DataAnnotations.Schema.Index(IsUnique = true)]
        [System.ComponentModel.DataAnnotations.StringLength(50)]
        public string Hash { get; set; }

        public string ContentType { get; set; }

        //[System.ComponentModel.DataAnnotations.Schema.Index]
        [System.ComponentModel.DataAnnotations.StringLength(500)]
        public string FileName { get; set; }

        public string ExtensionName { get; set; }

        public long Length { get; set; }

        public DateTime CreateOn { get; set; }

        //[System.ComponentModel.DataAnnotations.Schema.Index]
        [System.ComponentModel.DataAnnotations.StringLength(50)]
        public string CreateBy { get; set; }

        public byte[] FileBytes { get; set; }
    }
}
